﻿//  Copyright (c) 2010 Ray Liang (http://www.dotnetage.com)
//  Dual licensed under the MIT and GPL licenses:
//  http://www.opensource.org/licenses/mit-license.php
//  http://www.gnu.org/licenses/gpl.html

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace DNA.Mvc
{
    public class ViewComponentBuilderFactory<TComponent>
        where TComponent:ViewComponent
    {
        private IComponentItemContainer<TComponent> _container;

        protected IComponentItemContainer<TComponent> Container
        {
            get { return _container; }
            private set { _container = value; }
        }
        
        protected IViewDataContainer ViewDataContainer { get; set; }
        
        protected ViewContext ViewContext { get; set; }

        public ViewComponentBuilderFactory(IComponentItemContainer<TComponent> container, ViewContext viewContext, IViewDataContainer viewContainer)
        {
            this._container = container;
            this.ViewContext = viewContext;
            this.ViewDataContainer = viewContainer;
        }
    }
}
